import { ResPage, Special } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 规格管理模块
 */
// 获取列表
export const getList = (params: Special.ReqSpecParams) => {
  return http.post<ResPage<Special.ResSpecList>>(`/specification/list`, params);
};
export const getTableList = (params: Special.ReqSpecParams) => {
  return http.post<ResPage<Special.ResSpecList>>(`/specification/list`, params);
};
// 新增
export const add = (params: { id: string }) => {
  return http.post(`/specification`, params);
};

// 批量添加
export const BatchAdd = (params: FormData) => {
  return http.post(`/Good/import`, params);
};

// 编辑
export const edit = (params: { id: string }) => {
  return http.put(`/specification`, params);
};

// 删除
export const deleteOne = (params: { id: string }) => {
  return http.delete(`/specification`, params);
};
